#ifndef CRROUND_H
#define CRROUND_H

#include "crbet.h"
#include "tbllim.h"

#include "orderedlist.h"


class CrapsRound
{
	public:
		CrapsRound(void);
		~CrapsRound(void);

		uint8 numMoneyBets();
		uint8 numBets();
		bool8 repeatableBets(uint8 point, CTableLimits &tableLimits, CrapsRound *dependsRound);
		bool8 removableBets(uint8 point);

		CrapsBet* getBet(uint8 betId);
		bool8	addBet(CrapsBet* bet);

		int32	totalBet(void);
		int32	totalBonusBet(void);

		int32 calcPayout(uint8 die1, uint8 die2);
		int32 calcTotalWinningBets(uint8 die1, uint8 die2);
		
		void updateBetAmounts(int32 *bets);
		int32 * getBetAmounts();

		int32 CalcBetPayout(uint8 die1, uint8 die2);

		// CGC: CSN-2224
		int32 getMaxLimit(uint8 point, CTableLimits &tableLimits);

		
	protected:
		uint8		 m_numBets;
		CrapsBet	*m_bets[CrapsBet::NUMBETS];
};

class CrapsRoundList : public COrderedList<CrapsRound>
{
};

inline uint8 
CrapsRound::numBets()
{
	return m_numBets;
}

inline CrapsBet *
CrapsRound::getBet(uint8 betID)
{
	if (betID >= 0 && betID < CrapsBet::NUMBETS)
		return m_bets[betID];
	else
		return (CrapsBet *)0;
}

#endif
